package com.adinnet.admin.common.config;

import com.adinnet.common.upload.UploadConfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;

/**
 * @author: sunjianbo
 * @date: 2019/8/13 18:06
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    /**
     * 拦截器
     * @param registry
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/pic/**").addResourceLocations("file:"+UploadConfig.REAL_PATH);
    }
}
